﻿'    DotNetIRCD - An IRC Daemon written in VB.Net
'    Copyright (C) 2012 GeorgeBush
'
'    This program is free software: you can redistribute it and/or modify
'    it under the terms of the GNU General Public License as published by
'    the Free Software Foundation, either version 2 of the License, or
'    (at your option) any later version.
'
'    This program is distributed in the hope that it will be useful,
'    but WITHOUT ANY WARRANTY; without even the implied warranty of
'    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'    GNU General Public License for more details.
'
'    You should have received a copy of the GNU General Public License
'    along with this program. If not, see <http://www.gnu.org/licenses/>.

''' <summary>
''' This Module holds the list of accepted Operator Commands
''' </summary>
<HideModuleName()> _
Module OperatorCommandsModule

    ''' <summary>
    ''' Structure to hold the definition of an Operator Command
    ''' </summary>
    Public Structure OperatorCommand

        ''' <summary>
        ''' The Command
        ''' </summary>
        Public Command As String

        ''' <summary>
        ''' The Command's Syntax
        ''' </summary>
        Public Syntax() As String

        ''' <summary>
        ''' A Description of the Command
        ''' </summary>
        Public Description() As String

        ''' <summary>
        ''' Create a new instance of the OperCommand Structure
        ''' </summary>
        ''' <param name="Command">The Command</param>
        ''' <param name="Syntax">The Command's Syntax</param>
        ''' <param name="Description">A Description of the Command</param>
        Sub New(ByVal Command As String, ByVal Syntax() As String, ByVal Description() As String)

            Me.Command = Command
            Me.Syntax = Syntax
            Me.Description = Description

        End Sub

    End Structure

    ''' <summary>
    ''' The list of accepted Operator Commands
    ''' </summary>
    Public OperatorCommands() As OperatorCommand = _
        {New OperatorCommand("ADCHAT",
                             {"ADCHAT <text>"},
                             {"Sends a message to all online Admins",
                              "",
                              "Example: /ADCHAT Hey guys! I'm finally here."}),
         New OperatorCommand("ADDMOTD",
                             {"ADDMOTD <text>"},
                             {"Adds a line to the end of the MOTD",
                              "",
                              "Example: /ADDMOTD Play nice!"}),
         New OperatorCommand("ADDOMOTD",
                             {"ADDOMOTD <text>"},
                             {"Adds a line to the end of the OPERMOTD",
                              "",
                              "Example: /ADDOMOTD Abuse it and lose it!"}),
         New OperatorCommand("CHATOPS",
                             {"CHATOPS <Message>"},
                             {"Sends a message to all IRC Operators (global).",
                              "",
                              "Example: /CHATOPS Gonna k:line that user ..."}),
         New OperatorCommand("CHGHOST",
                             {"CHGHOST <Nick> <Host>"},
                             {"Changes the hostname of a user currently on the IRC network.",
                              "IRC Operator only command.",
                              "",
                              "Example: /CHGHOST GeorgeBush The.White.House"}),
         New OperatorCommand("CHGIDENT",
                             {"CHGIDENT <Nick> <Ident>"},
                             {"Changes the Ident of a user currently on the IRC network.",
                              "IRC Operator only command.",
                              "",
                              "Example: /CHGIDENT neocortex sheep"}),
         New OperatorCommand("CHGNAME",
                             {"CHGNAME <nick> <name>"},
                             {"Changes the 'IRC Name' (or 'Real Name') of a user currently on the IRC network.",
                              "IRC Operator only command.",
                              "",
                              "Example: /CHGNAME GeorgeBush Gotta new name :)"}),
         New OperatorCommand("CLOSE",
                             {"CLOSE"},
                             {"This command will disconnect all unknown connections from the",
                              "IRC server."}),
         New OperatorCommand("CONNECT",
                             {"CONNECT <server> [port]",
                              "CONNECT <leaf> <port> <hub>"},
                             {"Links another IRC server to the one you are currently on.",
                              "Remote connections are also possible.",
                              "IRC Operator only command.",
                              "",
                              "Example: /CONNECT leaf.*",
                              "Example: /CONNECT leaf.* 6667 hub.*"}),
         New OperatorCommand("DCCDENY",
                             {"DCCDENY <FileName Mask> <Reason>"},
                             {"Adds a DCC Deny for that Filename mask. This means that any",
                              "DCC sends of Files matching that Filename mask will be rejected.",
                              "IRC Operator only command."}),
         New OperatorCommand("DIE",
                             {"DIE",
                              "DIE <Password>"},
                             {"Kills the IRC daemon, disconnecting all users currently on that server.",
                              "IRC Operator only command."}),
         New OperatorCommand("DNS",
                             {"DNS [option]"},
                             {"Returns information about the IRC server's DNS cache.",
                              "Note, since most clients have a built-in DNS command,",
                              "you will most likely need to use /raw DNS to use this.",
                              "There are also 2 other variants:",
                              "",
                              "Example: /DNS l",
                              "Will show you the DNS cache entries",
                              "",
                              "Example: /DNS i",
                              "will give you details about the nameserver config"}),
         New OperatorCommand("GLINE",
                             {"GLINE <user@host mask or nick> [time] <reason>",
                              "GLINE -<user@host mask>"},
                             {"This command provides timed G:Lines. If you match a G:Line you cannot",
                              "connect to ANY server on the IRC network",
                              "A time of 0 in the GLINE makes it permanent (Never Expires).",
                              "You may also specify the time in the format 1d10h15m30s.",
                              "IRC Operator only command.",
                              "",
                              "Example: /GLINE neocortex 0 Spammer",
                              "Adds a permanent GLine for the Nickname neocortex for being a Spammer",
                              "",
                              "Example: /GLINE *@*.idiot.net 1d5h Spammers",
                              "Adds a 1Day 5Hor GLine for hosts matching *@*.idiot.net for being Spammers",
                              "",
                              "Example: /GLINE Idiot 1d Abuse",
                              "Adds a 1Day GLine for the Nickname Idiot for Abuse",
                              "",
                              "Example: /GLINE -*@*.idiot.net",
                              "Removes a GLine for hosts matching *@*.idiot.net",
                              "",
                              "NOTE: Requires the can_gkline Operator flag"}),
         New OperatorCommand("GLOBOPS",
                             {"GLOBOPS <message>"},
                             {"Sends a global Message to all IRCops. Only viewable by IRCops",
                              "(unlike WALLOPS, which can be viewed by normal users).",
                              "",
                              "Example: /GLOBOPS Lets get em clones .."}),
         New OperatorCommand("GZLINE",
                             {"GZLINE <*@ipmask> <seconds to be banned> :<reason>"},
                             {"This command provides timed global Z:line. If you match a Global Z:Line you cannot",
                              "connect to ANY server on the IRC network",
                              "A time of 0 in the GZLINE makes it permanent (Never Expires).",
                              "You may also specify the time in the format 1d10h15m30s.",
                              "IRC Operator only command.",
                                                            "",
                              "Example: /GZLINE +<*@ipmask> 0 Spammers",
                              "Adds a permanent Global Z:line for *@ipmask for being Spammers",
                              "",
                              "Example: /GZLINE -<*@ipmask>",
                              "Removes a Global Z:line for *@ipmask",
                              "",
                              "Example: /GZLINE *@4.16.200.* 1d5h Spammers",
                              "Adds a 1Day 15Hour Global Z:line for *@ipmask for being Spammers"}),
         New OperatorCommand("KILL",
                             {"KILL <Nick1>,<Nick2>,<Nick3>,... <Reason>"},
                             {"Forcefully Disconnects users from an IRC Server.",
                              "IRC Operator only command.",
                              "",
                              "Example: /KILL Jack16 Cloning is not allowed"}),
         New OperatorCommand("KLINE",
                             {"GLINE <user@host mask or nick> [time] <reason>",
                              "GLINE -<user@host mask>"},
                             {"This command provides timed G:Lines. If you match a G:Line you cannot",
                              "connect to this server",
                              "A time of 0 in the GLINE makes it permanent (Never Expires).",
                              "You may also specify the time in the format 1d10h15m30s.",
                              "IRC Operator only command.",
                              "",
                              "Example: /GLINE neocortex 0 Spammer",
                              "Adds a permanent GLine for the Nickname neocortex for being a Spammer",
                              "",
                              "Example: /GLINE *@*.idiot.net 1d5h Spammers",
                              "Adds a 1Day 5Hor GLine for hosts matching *@*.idiot.net for being Spammers",
                              "",
                              "Example: /GLINE Idiot 1d Abuse",
                              "Adds a 1Day GLine for the Nickname Idiot for Abuse",
                              "",
                              "Example: /GLINE -*@*.idiot.net",
                              "Removes a GLine for hosts matching *@*.idiot.net"}),
         New OperatorCommand("LAG",
                             {"LAG <Server>"},
                             {"This command is like a Traceroute for IRC servers",
                              "You type in /LAG irc.fyremoon.net and it will",
                              "reply from every server it passes with time and so on",
                              "Useful for looking where lag is and optional TS future/past travels"}),
         New OperatorCommand("LOCOPS",
                             {"LOCOPS <Message>"},
                             {"Sends a message to all IRCops at this server (local).",
                              "",
                              "Example: /LOCOPS Gonna k:line that user ..."}),
         New OperatorCommand("MKPASSWD",
                             {"MKPASSWD <method> <password>"},
                             {"This command will return a 'hash' of the string that has been specified.",
                              "Available types (in order of 'Secureness'):",
                              "md5, sha1, ripemd160",
                              "",
                              "Example: /MKPASSWD md5 IamTeh1337"}),
         New OperatorCommand("NACHAT",
                             {"NACHAT <text>"},
                             {"Sends a message to all online NetAdmins",
                              "",
                              "Example: /NACHAT Hey guys! How is everything?"}),
         New OperatorCommand("OPER",
                             {""},
                             {"Attempts to give a user IRC Operator status.",
                              "(Lets the IRCop Op up)",
                              "",
                              "Example: /OPER neocortex foobar234"}),
         New OperatorCommand("OPERMOTD",
                             {"OPERMOTD"},
                             {"Shows the IRCd Operator MOTD",
                              "IRC Operator only command."}),
         New OperatorCommand("REHASH",
                             {"REHASH"},
                             {"Prompts the server to reread its configuration.",
                              "IRC Operator only command."}),
         New OperatorCommand("RESTART",
                             {"RESTART",
                              "RESTART <Password>",
                              "RESTART <Password> <Reason>"},
                             {"Kills and Restarts the IRC daemon, disconnecting all users",
                              "currently on that server.",
                              "IRC Operator only command."}),
         New OperatorCommand("RPING",
                             {"RPING <servermask>"},
                             {"This will calculate the Lag (In milliseconds) between servers"}),
         New OperatorCommand("SAJOIN",
                             {"SAJOIN <nick> <Channel1>,<Channel2>.."},
                             {"Forces a user to join a channel.",
                              "Services Admin Command",
                              "",
                              "Example: /SAJOIN neocortex #OperHelp"}),
         New OperatorCommand("SAMODE",
                             {"SAMODE <channel> <mode>"},
                             {"Allows a Services Administrator to change the mode on a channel,",
                              "without having Operator status.",
                              "Services Admin Command",
                              "",
                              "Example: /SAMODE #Support +m"}),
         New OperatorCommand("SAPART",
                             {""},
                             {""}),
         New OperatorCommand("SDESC",
                             {""},
                             {""}),
         New OperatorCommand("SETHOST",
                             {""},
                             {""}),
         New OperatorCommand("SETIDENT",
                             {""},
                             {""}),
         New OperatorCommand("SHUN",
                             {""},
                             {""}),
         New OperatorCommand("SPAMFILTER",
                             {""},
                             {""}),
         New OperatorCommand("SQUIT",
                             {""},
                             {""}),
         New OperatorCommand("TEMPSHUN",
                             {""},
                             {""}),
         New OperatorCommand("TRACE",
                             {""},
                             {""}),
         New OperatorCommand("TSCTL",
                             {""},
                             {""}),
         New OperatorCommand("UNDCCDENY",
                             {""},
                             {""}),
         New OperatorCommand("WALLOPS",
                             {""},
                             {""}),
         New OperatorCommand("ZLINE",
                             {""},
                             {""})}

End Module